@extends('layouts.layouts')
@section('title')
    <title>后台首页</title>
@endsection
@section('content')
    <link rel="stylesheet" href="/lib/layer/theme/default/layer.css"/>
    <script type="text/javascript" src="/lib/layer/layer.js"></script>
    <div class="content">
        <div class="header">
            <ul class="breadcrumb">
                <li><a href="/special/index">专题管理</a></li>
                <li class="active">专题::{{$title->title}}</li>
            </ul>
        </div>
        <div class="main-content">
            <div class="btn-toolbar list-toolbar">
                <form class="form-inline col-sm-4" action="" method="get">
                    <a href="javascript:;" onclick="history.go(-1);"><button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" >返回</button></a>
                    <!-- <div class="form-group">
                        <input type="text" class="form-control" name="title" placeholder="文章标题" value="">
                    </div>
                    <button type="submit" class="btn btn-default">筛选</button> -->
                </form>
               
            </div>

            <div class="row">
                <div class="col-sm-12 col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-heading no-collapse">专题::{{$title->title}}</div>
                        <table class="table table-bordered table-striped">
                            <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>文章名称</th>
                                    <th>封面图</th>
                                    <th>所属类别</th>
                                    <th>所属标签</th>
                                    <th>精选日期</th>
                                    <th>排序值</th>
                                    <th>作者</th>
                                    <th>更新时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach($data as $v)
                                    <tr>
                                        <td>{{$v->id}}</td>
                                        <td>{{$v->title}}</td>
                                        <td><img src='{{env("IMG_URL")}}{{$v->cover_url}}' alt="" width="100"/></td>
                                        <td>{{article_types($v->type_ids)}}</td>
                                        <td>{{article_tags($v->tag_ids)}}</td>
                                        <td>{{$v->today_selected}}</td>
                                        <td>{{$v->orderby}}</td>
                                        <td>{{$v->user_id}}</td>
                                        <td>{{$v->updated_at}}</td>
                                        <td><a class="btn btn-success btn-xs" href="/special/articleDel/{{$v->id}}/{{$id}}">删除</a></td>
                                    </tr>
                                @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        
        </div>
    </div>
   
@endsection